/**
 * 
 */
package com.zhaoyan.pojo;

/**
 * @author zhaoyan
 *
 * 2020年1月30日
 */
public class VoteItem {
	
	
	private Integer id;
	private String name;
	private Integer votes;
	private Integer topic_id;

	
	//	扩展字段
	private String progress;

	public String getProgress() {
		return progress;
	}
	public void setProgress(String progress) {
		this.progress = progress;
	}
	
	
	
	@Override
	public String toString() {
		return "VoteItem [id=" + id + ", name=" + name + ", votes=" + votes + ", topic_id=" + topic_id + "]";
	}
	/**
	 * @param id
	 * @param name
	 * @param votes
	 * @param topic_id
	 */
	public VoteItem(Integer id, String name, Integer votes, Integer topic_id) {
		super();
		this.id = id;
		this.name = name;
		this.votes = votes;
		this.topic_id = topic_id;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getVotes() {
		return votes;
	}
	public void setVotes(Integer votes) {
		this.votes = votes;
	}
	public Integer getTopic_id() {
		return topic_id;
	}
	public void setTopic_id(Integer topic_id) {
		this.topic_id = topic_id;
	}
	/**
	 * 
	 */
	public VoteItem() {
		super();
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((topic_id == null) ? 0 : topic_id.hashCode());
		result = prime * result + ((votes == null) ? 0 : votes.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		VoteItem other = (VoteItem) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (topic_id == null) {
			if (other.topic_id != null)
				return false;
		} else if (!topic_id.equals(other.topic_id))
			return false;
		if (votes == null) {
			if (other.votes != null)
				return false;
		} else if (!votes.equals(other.votes))
			return false;
		return true;
	}
	
	

}
